package com.ruoyi.business.service;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.bizsys.domain.ExtIdentityResult;
import com.ruoyi.bizsys.domain.RealNameAuthLog;
import com.ruoyi.business.common.constant.KycApiEnum;
import com.ruoyi.business.domain.BVNInfo;

import java.util.List;

public interface IRealNameService {

    Object preAuth(BVNInfo bvnInfo, JSONObject deviceInfo);

    boolean realNameRiskCheck(String fingerprint);

    JSONObject sendSms(String phone);

    /**
     *
     * @param isOldVersion 是否旧版本
     */
    void processRealNameAuth(Boolean isOldVersion);

    ExtIdentityResult bvnVerification(BVNInfo bvnInfo, List<String> invalidDataApiNames);

    /**
     * 校验实名失败次数
     * @param userId
     * @return
     */
    int realNameFailPreCheck(String userId);


    /**
     * OkraAccount One pipe接口是否打开
     * @return
     */
    boolean accountApiCheck();

    JSONObject verifyPhone(String phone, String accountNumber, String bvn);

    /**
     * 实名生日校验
     * @param birthDate 用户填写生日
     * @param bvnDob 接口返回 可能多个
     */
    void dobVerify(String birthDate, String bvnDob, RealNameAuthLog realNameAuthLog);

    void saveRealNameAuthLog(BVNInfo bvnInfo, RealNameAuthLog realNameAuth, ThreadLocal<String> threadLocal);

    /**
     * kyc接口开关
     * @param apiEnum
     * @return
     */
    boolean kycApiSwitch(KycApiEnum... apiEnum);

}
